package com.ty.day4;

import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/9 18:04
 */
public class Task2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入到手金额：");
        double money = sc.nextDouble(), yns = 0;
        if (money < 0) {
            System.out.println("怎么回事老弟，还负债吗？");
            return;
        }
        double x = money - 3500;
        if (x > 80000) {
            yns = x * 0.45 - 13505;
        } else if (x > 55000) {
            yns = x * 0.35 - 5505;
        } else if (x > 35000) {
            yns = x * 0.3 - 2755;
        } else if (x > 9000) {
            yns = x * 0.25 - 1005;
        } else if (x > 4500) {
            yns = x * 0.2 - 555;
        } else if (x > 1500) {
            yns = x * 0.1 - 105;
        } else if (x > 0) {
            yns = x * 0.03;
        }
        System.out.println("个人所得税："+yns);
    }
}
